//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//
#ifndef __IPL_CFG_H
#define __IPL_CFG_H

//------------------------------------------------------------------------------

#include <BootStoreNand.h>
#include <flash_cfg.h>

//------------------------------------------------------------------------------

#define BLOCK_SIZE 0x20000

// This table must describe the reserved/binary regions that preceed the OS partitions (MOBM, EBOOT, IPL, ARGS)
// The boot store will skip over these regions and mount only OS partitions (ULDR, ROMIMAGE/NK, IMGFS, TFAT)
BOOT_STORE_NAND_INIT_CONTEXT 
g_nandStoreInit = {
    0,
    // {TIM, MOBM, EBOOT, IPL, EBOOTCFG}
    { ( LB_FLASH_BLOCK_TIM_LENGTH) * BLOCK_SIZE,       // mark the reserved region including:TIM, MOBM, EBOOT, IPL, EBOOTCFG.
       LB_FLASH_BLOCK_MOBM_LENGTH * BLOCK_SIZE, 
       LB_FLASH_BLOCK_EBOOT_LENGTH * BLOCK_SIZE, 
       LB_FLASH_BLOCK_IPL_LENGTH * BLOCK_SIZE, 
       FLASH_BLOCK_EBOOTCFG_LENGTH * BLOCK_SIZE }
};

BOOT_STORE_INIT
g_bootStoreInit = {
    BootStoreNandInit, 
    &g_nandStoreInit, 
    sizeof(g_nandStoreInit)
};

//------------------------------------------------------------------------------

#endif
